package by.alex.dzeshko.lastfmsimple.content;

import android.net.Uri;

public class Contract {

	public static final String AUTHORITY = "by.alex.dzeshko.lastfmsimple.content.provider.";

	public static final class AlbumsColumns extends TableGetters {

		public AlbumsColumns() {
		}

		public static final String TABLE_NAME = "ALBUMS_TABLE";

		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/" + TABLE_NAME;
		
		/** path to table provider */
		public static final Uri CONTENT_URI = Uri.parse("content://"
				+ AUTHORITY + "AlbumsProvider/" + TABLE_NAME);

		public static final String MBID = _ID;

		public static final String NAME = "ALBUM_NAME";
		
		public static final String ARTIST = "ARTIST";
		
		public static final String URL = "URL";

		public static final String IMAGE_SMALL = "IMAGE_SMALL";
		
		public static final String IMAGE_MEDIUM = "IMAGE_MEDIUM";
		
		public static final String IMAGE_LARGE = "IMAGE_LARGE";
		
		public static final String IMAGE_XLARGE = "IMAGE_XLARGE";
		
		public static final String MARKER = "MARKER";

		public final static String[] COLUMNS = {
			Contract.AlbumsColumns.MBID,
			Contract.AlbumsColumns.NAME,
			Contract.AlbumsColumns.ARTIST,
			Contract.AlbumsColumns.URL,
			Contract.AlbumsColumns.IMAGE_SMALL,
			Contract.AlbumsColumns.IMAGE_MEDIUM,
			Contract.AlbumsColumns.IMAGE_LARGE,
			Contract.AlbumsColumns.IMAGE_XLARGE,
			Contract.AlbumsColumns.MARKER
		};
		
		@Override
		String getTableName() {
			return AlbumsColumns.TABLE_NAME;
		}

		@Override
		String[] getColumns() {
			return AlbumsColumns.COLUMNS;
		}
	}
	
	public static final class ArtistsColumns extends TableGetters {

		public ArtistsColumns() {
		}

		public static final String TABLE_NAME = "ARTISTS_TABLE";

		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/" + TABLE_NAME;
		
		/** path to table provider */
		public static final Uri CONTENT_URI = Uri.parse("content://"
				+ AUTHORITY + "ArtistsProvider/" + TABLE_NAME);

		public static final String MBID = _ID;

		public static final String NAME = "NAME";
		
		public static final String SUMMARY = "SUMMARY";

		public static final String IMAGE_SMALL = "IMAGE_SMALL";
		
		public static final String IMAGE_MEDIUM = "IMAGE_MEDIUM";
		
		public static final String IMAGE_LARGE = "IMAGE_LARGE";
		
		public static final String IMAGE_XLARGE = "IMAGE_XLARGE";

		public final static String[] COLUMNS = {
			Contract.ArtistsColumns.MBID,
			Contract.ArtistsColumns.NAME,
			Contract.ArtistsColumns.SUMMARY,
			Contract.ArtistsColumns.IMAGE_SMALL,
			Contract.ArtistsColumns.IMAGE_MEDIUM,
			Contract.ArtistsColumns.IMAGE_LARGE,
			Contract.ArtistsColumns.IMAGE_XLARGE
		};
		
		@Override
		String getTableName() {
			return ArtistsColumns.TABLE_NAME;
		}

		@Override
		String[] getColumns() {
			return ArtistsColumns.COLUMNS;
		}
	}
	
	public static final class TracksColumns extends TableGetters {

		public TracksColumns() {
		}

		public static final String TABLE_NAME = "TRACKS_TABLE";

		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/" + TABLE_NAME;
		
		/** path to table provider */
		public static final Uri CONTENT_URI = Uri.parse("content://"
				+ AUTHORITY + "TracksProvider/" + TABLE_NAME);

		public static final String MBID = _ID;

		public static final String NAME = "NAME";
		
		public static final String ARTIST = "ARTIST";
		
		public static final String DURATION = "DURATION";
		
		public static final String SUMMARY = "SUMMARY";

		public static final String IMAGE_SMALL = "IMAGE_SMALL";
		
		public static final String IMAGE_MEDIUM = "IMAGE_MEDIUM";
		
		public static final String IMAGE_LARGE = "IMAGE_LARGE";
		
		public static final String IMAGE_XLARGE = "IMAGE_XLARGE";
		
		public static final String MARKER = "MARKER";

		public final static String[] COLUMNS = {
			Contract.TracksColumns.MBID,
			Contract.TracksColumns.NAME,
			Contract.TracksColumns.ARTIST,
			Contract.TracksColumns.DURATION,
			Contract.TracksColumns.SUMMARY,
			Contract.TracksColumns.IMAGE_SMALL,
			Contract.TracksColumns.IMAGE_MEDIUM,
			Contract.TracksColumns.IMAGE_LARGE,
			Contract.TracksColumns.IMAGE_XLARGE,
			Contract.TracksColumns.MARKER
		};
		
		@Override
		String getTableName() {
			return TracksColumns.TABLE_NAME;
		}

		@Override
		String[] getColumns() {
			return TracksColumns.COLUMNS;
		}
	}
}
